<template>
  <div>
    <button @click="handleSend">发送请求</button>
    <div>{{ message }}</div>
  </div>
</template>
<script setup>

import { ref } from 'vue'
import { login } from './api/user'

const message = ref('未发送请求')

const handleSend = () => {
  login({
    name: 'admin',
    password: '123456'
  }).then(res => {
    console.log(res)
    message.value = res.data
  })
}
</script>
